<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      // var arr1 = [2, 0, 6, 1, 77, 0, 52, 0, 25, 7, 10, 11, 15, 79];
      // var arr2 = [];
      // var a = 0;
      // for (i = 0; i < arr1.length; i++) {
      //   if (arr1[i] > 10) {
      //     arr2[a] = arr1[i];
      //     a++;
      //   }
      // }
      // console.log(arr2);
      var arr1 = [2, 0, 6, 1, 77, 0, 52, 0, 25, 7, 10, 11, 15, 79];
      var arr2 = [];
      for (i = 0; i < arr1.length; i++) {
        if (arr1[i] > 10) {
          arr2[arr2.length] = arr1[i];
        }
      }
      console.log(arr2);
    </script>
  </body>
</html>
